package com.zlkj.pro.core.exception.enums;

import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;

/**
 * @author 孙铭泽
 * @date 2022/3/23
 * @time 18:33
 */
public enum BusinessExceptionEnum implements AbstractExceptionEnum {

    /**
     * 业务异常
     */
    BUSINESS_EXCEPTION("A0401", "业务异常"),
    FILE_NAME_CANNOT_BE_EMPTY("A0401", "文件名称不能为空"),
    PAYMENT_FAILED("A0401", "支付失败"),
    THE_CURRENT_ACCOUNT_IS_ALREADY_LOGGED_IN_ON_ANOTHER_DEVICE("B0301", "当前账号已在其他设备登录，请重新登录"),
    LOGIN_IS_INVALID_PLEASE_LOG_IN_AGAIN("B0301", "请重新登录"),
    THE_EXPRESS_DELIVERY_SYSTEM_IS_BUSY("A0401", "暂未查询到快递信息,请稍后再试"),
    IDENTITY_AUTHENTICATION_FAILURE("A0401", "身份认证失败"),
    ALIPAY_TRANSFER_FAILED("A0401", "支付宝转账失败，请联系客服"),
    ALIPAY_FAILED_TO_BUILD_A_CERTIFICATE_PROCEDURE("A0401", "支付宝构建证书失败，请联系管理员"),
    ALIPAY_REFUND_ERROR("A0401", "支付宝退款失败，请联系管理员"),
    THE_APPLE_SERVER_IS_ABNORMAL("A0401", "苹果服务器异常"),
    USER_STATUS_FAIL("A0501", "该用户已被禁用"),
    ;

    private final String errorCode;
    private final String userTip;

    BusinessExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

    @Override
    public String getErrorCode() {
        return this.errorCode;
    }

    @Override
    public String getUserTip() {
        return this.userTip;
    }
}
